<!-- 普通类型响应数据 -->
<template>
  <div class="a">
    <h4>----------A----------</h4>
    <h5>你好，人</h5>
    <h5>姓名:{{ name }}</h5>
    <h5>年龄:{{ age }}</h5>
    <button @click="changeName">修改名字</button>
    <button @click="changeAge">修改年龄</button>
    <button @click="showTel">查看电话</button>
  </div>
</template>

<script setup lang="ts" name="A">
import { ref } from "vue"
let name = ref("李四")
let age = ref(20)
let tel = "12345678901"
function showTel() {
  alert(tel)
}
function changeName() {
  name.value = "zs"
}
function changeAge() {
  age.value += 1
}
</script>

<style>
.a {
  background-color: skyblue;
  box-shadow: 0 0 10px #000;
  border-radius: 10px;
  padding: 20px;
}

button {
  margin: 0 10px;
}
</style>